
export var routes = [
    {
        path: '/home',
        component: () => import('@/components/Home.vue'),
        meta: { title: '小鸟' }
    },
    {
        path: '/profile',
        component: () => import('@/components/Profile.vue'),
        meta: { title: '甲鱼' }

    },
    {
        path: '/setting',
        component: () => import('@/components/Settings.vue'),
        meta: { title: '设置' }
    },
    {
        path: '/about',
        component: () => import('@/components/About.vue'),
        children: [
            {
                path: 'team',
                component: () => import('@/components/Team.vue')
            },
            {
                path: 'history',
                component: () => import('@/components/History.vue')
            },
        ],
        meta: { title: '关于' }
    },
    {
        path: '/user/:id',
        component: () => import('@/components/User.vue')
    },
    {
        path: '/layout',
        component: () => import('@/components/Layout.vue'),
        children: [
            {
                path: 'home',
                components: {
                    default: () => import('@/components/Home.vue'),
                    sidebar: () => import('@/components/Sidebar.vue')
                }
            }
        ],
    },
    // 嵌套路由
    {
        path: '/parent',
        component: () => import('@/components/Parent.vue'),
        children: [
            {
                path: ':name',
                component: () => import('@/components/Child_1.vue')
            },
            {
                path: 'child2',
                component: () => import('@/components/Child_2.vue')
            },
            {
                path: 'child/:id?',
                component: () => import('@/components/Child.vue'),
                props: true,
                children: [{
                    path: 'grandChild/:name?',
                    component: () => import('@/components/GrandChild.vue'),
                    props: true
                }]
            }
        ]
    }
]